package com.carolouvindam.Model;

import com.carolouvindam.R;


public class Product {
    private Integer idDb;
    private String name;
    private int iDIllustration;
    private String description;

    public Product(String name, Integer idDb) {
        this.idDb = idDb;
        this.name = name;
        this.setIDPicture(this.idDb);
    }


    public Product( String name, Integer idDb, int illustration, String description) {
        this.idDb = idDb;
        this.name = name;
        this.iDIllustration = illustration;
        this.description = description;
        this.setIDPicture(this.idDb);
    }

    public Integer getIdDb() {
        return idDb;
    }

    public void setIdDb(Integer idDb) {
        this.idDb = idDb;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getIllustration() {
        return iDIllustration;
    }

    public void setIllustration(int illustration) {
        this.iDIllustration = illustration;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    private void setIDPicture(int IDdatabase) {
        switch (IDdatabase) {
            case 0:
                this.iDIllustration = R.drawable.cakeflowerpower;
                break;
            case 1:
                this.iDIllustration = R.drawable.chococoulant;
                break;
            case 2:
                this.iDIllustration = R.drawable.defaut;
                break;
            case 3:
                this.iDIllustration = R.drawable.gatobonbon;
                break;
            case 4:
                this.iDIllustration = R.drawable.gatokipik;
                break;
            case 5:
                this.iDIllustration = R.drawable.gatomagik;
                break;
            case 6:
                this.iDIllustration = R.drawable.gatovanille;
                break;
            case 7:
                this.iDIllustration = R.drawable.heinecake;
                break;
            case 8:
                this.iDIllustration = R.drawable.meatcake;
                break;
            case 9:
                this.iDIllustration = R.drawable.niancake;
                break;
            case 10:
                this.iDIllustration = R.drawable.poetrycake;
                break;
            case 11:
                this.iDIllustration = R.drawable.tastycake;
                 break;
            case 12:
                this.iDIllustration = R.drawable.wiicake;
                break;
            default:

                this.iDIllustration = R.drawable.defaut;

        }
    }
}
